package com.danbay.cloud.device.constant;

/**
 * @author yangyanchen on 2017/12/22
 *         Copyright © 2016 －2017 旦倍科技
 */
public class DeviceCommonConstant {

    public static final String DEVICE_OFF_LINE_KEY = "device_off_line_key";

    public static final String DEVICE_UN_ADD = "0";

    public static final String DEVICE_UN_DELETED = "0";

    public static final String DEVICE_ONLINE_STATE = "0";

    public static final Integer DEVICE_COLLECTOR_ORIGIN_COUNT = 0;

    public static final String DEVICE_EM_COLLECTOR = "1";

    public static final String DEVICE_WM_COLLECTOR = "2";

    public static final Integer SWITCH_CLOSE = 0;

    public static final Integer SWITCH_OPEN = 1;

    public static String parseDeviceType(String snid){
        if (null == snid){
            return "";
        }else if (snid.contains("EM")) {
            return DEVICE_EM_COLLECTOR;
        }else if (snid.contains("WM")){
            return DEVICE_WM_COLLECTOR;
        }
        return "";
    }
}
